package com.fzy.core.codetools;

import java.util.List;

import org.apache.commons.lang.StringUtils;

import com.fzy.core.system.entity.Module;

public class ModuleWrapper {
	Module data;
	MappingWrapper parent;
	List entities;
	
	public String getTitle(){
		return data.getTitle();
	}
	
	public String getName(){
		return data.getName();
	}
	
	public String getNamespace(){
		String result = data.getNamespace();
		if(StringUtils.isBlank(result))
			result = parent.getNamespace();
		return result;
	}
	
	public String getPrefix(){
		String result = "";
		if(data.getPrefix() != null) 
			result = data.getPrefix();
		else
			result = parent.getPrefix();
		return result;
	}
	
	////////////////////////////////// generated /////////////////////////////////////////////
	public Module getData() {
		return data;
	}
	public void setData(Module data) {
		this.data = data;
	}
	public MappingWrapper getParent() {
		return parent;
	}
	public void setParent(MappingWrapper parent) {
		this.parent = parent;
	}
	public List getEntities() {
		return entities;
	}
	public void setEntities(List entities) {
		this.entities = entities;
	}
	
}
